package com.bishe.demo.modules.ticket.dao;

import com.bishe.demo.modules.common.entity.City;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description TrainCityDao
 * @Author YHQ
 * @Date 2021/3/31 16:19
 */
@Repository
@Mapper
public interface TrainCityDao {

    //通过pid查省份
    @Select("select * from common_city where pid = #{pid}")
    List<City> province(Integer pid);

    //通过pid查对应省会城市
    @Select("select * from common_city where pid =#{pid} ")
    List<City> citiesByPid(Integer pid);

}
